_id = _this select 2;

if(HideWeaponFlag)then{
	//--
	//-- Show weapons 
	//--
	//[nil, nil, (currentTask player), "FAILED"] execvm "\ca\modules\mp\data\scriptcommands\taskhint.sqf";
	
	// add ammos
	{ player addMagazine _x; } foreach AmmoList;
	
	// add weapons
	{ player addWeapon _x; } foreach WeaponsList;
	
	// reselect the weapon (to avoid to press F)
	if ( (primaryWeapon player) != "") then {
	  private['_type', '_muzzles'];

	  _type = primaryWeapon player;
	  // check for multiple muzzles (eg: GL)
	  _muzzles = getArray(configFile >> "cfgWeapons" >> _type >> "muzzles");

	  if (count _muzzles > 1) then {
		player selectWeapon (_muzzles select 0);
	  }else{
		player selectWeapon _type;
	  };
	};
	
	player removeAction _id;
	
	sleep 2;
	
	// change action from "Show" to "Hide"
	
	player addAction ["Hide my weapons","HumanActionHideWeapon.sqf", [], 100, false, false, "", "true"];
	
	HideWeaponFlag=false;
	
}else{
	//--
	//-- Hide weapons 
	//--
	WeaponsList = weapons player;
	AmmoList = magazines player;
	removeAllWeapons player;
	
	// change action from "Hide" to "Show"
	player removeAction _id;
	player addAction ["Show my weapons","HumanActionHideWeapon.sqf", [], 100, false, false, "", "true"];
	
	HideWeaponFlag=true;
	
};